package com.castle.fortress.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 权限类型枚举
 * @author Dawn
 */
@Getter
@AllArgsConstructor
public enum AuthorityTypeEnum {
    APP(1,"应用","应用"),
    DOC(2,"文章","文章"),
    QUESTION_BANK(3,"题库","题库"),
    EXAM(4,"试卷","试卷"),
    EVALUATE(5,"考评","考评"),
    COURSE(6,"课程","课程"),
    BIRTHDAY_PUSH_ROLE(10,"政治生日推送规则","政治生日推送规则"),
    REMITTER(11,"代缴人","代缴人"),
    COST(12,"党费","党费"),


    ;

    Integer code;
    String name;
    String desc;

    public static Integer getCodeByDesc(String desc){
        for(BankCardTypeEnum e:BankCardTypeEnum.values()){
            if(e.getDesc().equals(desc)){
                return e.getCode();
            }
        }
        return null;
    }
}
